// router 路由文件
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/tabbar/Home.vue'
import Address from '../components/address/Address.vue'
import AddressList from '../components/address/AddressList.vue'

import Order from '../components/order/Order.vue'
import Login from '../components/tabbar/Login.vue'
import Myinfo from '../components/tabbar/Myinfo.vue'
import Search from '../components/tabbar/Search.vue'
import ShoppingCar from '../components/tabbar/ShoppingCar.vue'
import Class from '../components/tabbar/Class.vue'
import goodlist from '../components/goods_dome/goodlist.vue'
import good_date from '../components/goods_dome/goods_date.vue'
Vue.use(VueRouter)
const routes = [

  {
    path: '/',
    name: 'home',
    component: Home,
  },
  {
    path: '/address', 
    component: Address
  },
  {
    path: '/addresslist', 
    component: AddressList

  },

  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/search', component: Search },
  { path: '/shoppingcar',name:'/shoppingcar' ,component: ShoppingCar ,props:true},
  { path: '/order', component: Order },
  { path: '/login', component: Login },
  { path: '/myinfo', component: Myinfo },
  { path: '/class', component: Class },
  { path: '/search', component: Search },
  { path: '/goodlist/:id', component: goodlist,props:true},
  { path: '/gooddate',name:'/gooddate', component: good_date,props:true},

]



const router = new VueRouter({
  routes
})

export default router
